package com.linsir.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * @Auther: yuxiaolin
 * @Date: 2021/5/30 15:19
 * @Description:
 */
@Mapper
public interface ModelMapper extends BaseMapper<Object> {

    @Update(value = {"create table ${tableName} (id int(8),name varchar(255))"})
    void createTable(@Param("tableName") String tableName);

    @Select(value = {"select * from ${tableName}"})
    List<Map<String,Object>> SelectModel(@Param("tableName") String tableName);
}
